#ifndef CHATINTERFACE_H
#define CHATINTERFACE_H

#include <header.h>
#include <QMainWindow>
#include <QObject>
#include <QWidget>
class userZZL;
class chatinterface : public QMainWindow
{
    Q_OBJECT
public:
    explicit chatinterface(QString myName, QString peerName,QWidget *parent = nullptr);

signals:
private slots:
    void onSendButtonClicked();
    void onRecvButtonClicked();
    void onInviteButtonClicked();
private:
    QVBoxLayout *mainLayout;
    QVBoxLayout *subLayout2;
    QHBoxLayout *subLayout;
    QHBoxLayout *buttonLayout;

    QWidget *centralWidget;

    QLabel *peerName;
    QLabel *groupMemLabel;
    QTextEdit *logChat;
    QListWidget *groupMemberList;
    QLineEdit *msgSend;
    QPushButton *sendButton;
    QPushButton *recvButton;
    QPushButton *inviteButton;

    QString myName;
    QString peerNameStr;
    userZZL *user;

    QString getSendMsgString();

    void initData();
    void initLayout();
};

#endif // CHATINTERFACE_H
